home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January
/
CHIP_CD_01_2007.iso
/
Hity z okladki
/
OrgPlus 6 SBE
/
ORGPL.CAB
/
countPage.js
< prev
next >
Wrap
Text File
|
2006-09-20
|
2KB
|
90 lines
/**********************************************************
* *
* (C) Copyright 2002 - 2004, Human Concepts (tm) *
* *
***********************************************************
* File name: countPage.js *
* Author: Andrey Ponomarev *
**********************************************************/
window.onload = doInit
window.onresize = onResize
function doInit()
{
var width = parseInt(document.body.clientWidth);
var col = parseInt(width * 2 / 3);
ListObject.addColumn("<b>Title</b>", col) //Loc
ListObject.addColumn("<b>Count</b>", width - col) //Loc
var obj = top.hcMain
if ( typeof (obj) == "object" && typeof (obj.onNavigatePageInit) != "undefined" )
obj.onNavigatePageInit()
}
function onResize()
{
if( typeof(ListObject) == "object" )
{
var nWidth = document.body.clientWidth - 2
var nHeight = document.body.clientHeight - 2
if (document.body.scrollHeight > nHeight)
ListObject.SetWidth("100%");
else
ListObject.SetWidth(nWidth);
}
}
function clearPage()
{
if (ListObject.m_created == true)
{
ListObject.RemoveList();
}
top.hcMain.focus();
}
function fillPage(group)
{
clearPage()
if( typeof( group ) == "object" )
{
var ancObjs = group.getElementsByTagName("a")
for (i = 0; i < ancObjs.length; i++)
{
if (ancObjs(i).name == "Count")
{
var paramObjs = ancObjs(i).getElementsByTagName("param")
for (j = 1; j < paramObjs.length; j++)
{
var obj = paramObjs(j)
var str = obj.name
if (typeof(str) != "undefined" )
{
var strValue = ""
if ( typeof (obj.value) != "undefined" )
strValue = obj.value
if (ListObject.m_created == false)
ListObject.createIn(document.body);
ListObject.addItem(0, str, strValue);
}
} //for
onResize();
top.hcMain.focus();
return;
}
} //for
}
onResize();
top.hcMain.focus();
}